<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>register</title>
  <link rel="stylesheet" href="./css/login.css">
</head>

<body>
  <form action="http://127.0.0.1:8888/v1/users/reg" method="POST" class="login-form">
    <h1>大自然旅游注册</h1>

    <div class="txtb">
      <input type="text" name="username">
      <span data-placeholder="用户名"></span>
    </div>

    <div class="txtb">
      <input type="password" name="userpassword">
      <span data-placeholder="请输入密码"></span>
    </div>

    <div class="txtb">
      <input type="text" name="userphone">
      <span data-placeholder="请输入手机号"></span>
    </div>

    <input type="submit" class="logbtn" value="注册">

    <div class="bottom-text">
      已有账号？
      <a href="./login.html">去登录~</a>
    </div>

  </form>


  <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
  <script>
    $(".txtb input").on("focus", function () {
      $(this).addClass("focus");
    });

    $(".txtb input").on("blur", function () {
      if ($(this).val() == "")
        $(this).removeClass("focus");
    });
  </script>
</body>

</html>